<script>
    var admin_group_id = {$admin_group_id};
    var ids = '{$ids}';
</script>
<div class="panel panel-default panel-intro">
    {:build_heading()}

    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="one">
                <div class="widget-body no-padding">
                    <div id="toolbar" class="toolbar">
                        <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
                        <!--<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('crm/cooperation/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>-->
                        <!--<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('crm/cooperation/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>-->
             <!-- <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('crm/cooperation/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>-->
                   <!--     <a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('crm/cooperation/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>-->

                        <!--<div class="dropdown btn-group {:$auth->check('crm/cooperation/multi')?'':'hide'}">
                            <a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
                            <ul class="dropdown-menu text-left" role="menu">
                                <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
                                <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
                            </ul>
                        </div>-->
                        <a href="javascript:;" class="btn btn-default" style="font-size:14px;color:dodgerblue;">

                            <span class="extend">
                                 <i class="fa fa-dollar"></i>
                                首签金额：<span id="shouMoney">0</span>元
                                &nbsp;,
                                 <i class="fa fa-dollar"></i>
                                续约金额：<span id="xuMoney">0</span>元
                            </span>
                        </a>
                    </div>
                    <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
                           data-operate-edit="{:$auth->check('crm/cooperation/edit')}" 
                           data-operate-del="{:$auth->check('crm/cooperation/del')}" 
                           width="100%">
                    </table>
                </div>
            </div>

        </div>
    </div>
</div>
<script id="customformtpl" type="text/html">
    <form id="cxselectform" class="form-horizontal form-commonsearch nice-validator n-default n-bootstrap" novalidate="" method="post" action="">
        <fieldset>
            <div class="row">
                <div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-3">
                    <label for="buser.username" class="control-label col-xs-4">客户名称</label>
                    <div class="col-xs-8">
                        <input type="hidden" class="form-control operate" name="buser.username-operate" data-name="buser.username" value="LIKE" readonly="">
                        <input type="text" class="form-control username" name="buser.username" value="{$allotData.username}" placeholder="客户名称" id="buser.username" data-index="2">
                    </div>
                </div>

                <div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-3">
                    <label for="product.product" class="control-label col-xs-4">产品</label>
                    <div class="col-xs-8">
                        <input type="hidden" class="form-control operate" name="product.product-operate" data-name="product.product" value="LIKE" readonly="">
                        <input type="text" class="form-control product" name="product.product" value="{$allotData.product}" placeholder="产品" id="product.product" data-index="3">
                    </div>
                </div>
                <div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-3">
                    <label for="statuslist" class="control-label col-xs-4">状态</label>
                    <div class="col-xs-8">
                        <input type="hidden" class="form-control operate" name="statuslist-operate" data-name="statuslist" value="=" readonly="">
                        <select class="form-control" name="statuslist">
                            <option value="">选择</option>
                            <option value="1">未到期</option>
                            <option value="2">已到期</option>
                        </select>
                    </div>
                </div>
                <div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-3">
                    <label for="typelist" class="control-label col-xs-4">类型</label>
                    <div class="col-xs-8">
                        <input type="hidden" class="form-control operate" name="typelist-operate" data-name="typelist" value="=" readonly="">
                        <select class="form-control" name="typelist">
                            <option value="">选择</option>
                            <option value="1">首签</option>
                            <option value="2">续约</option>
                        </select>
                    </div>
                </div>
                {if condition='$admin_data["name"] neq "销售专员"'}
                    <div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-3 group_select">
                        <label for="group" class="control-label col-xs-4">分组</label>
                        <div class="col-xs-8">
                            <!--     <input type="hidden" class="form-control operate" name="qilist-operate" data-name="qilist" value="=" readonly="">-->
                            <div class="form-inline" data-toggle="cxselect" data-selects="first,second">
                                <select class="first form-control operate" id="group" name="group_id-operate" data-url='' data-name="group_id">
                                    <option value="">请选择</option>
                                    {foreach name='groupData' item='v'}
                                        <option value="{$v.id}" >{$v.name}</option>
                                    {/foreach}
                                </select>
                                <select class="second form-control operate" id="admin_id" name="admin_id-operate" data-name="admin_id" data-url="crm/group/admin_group" data-query-name="pid">
                                    <option value="">请选择</option>
                                    {foreach name='xiaoData' item='v'}
                                        <option value="{$v.id}" {if condition="$admin_id eq $v['id']"}selected{/if}>{$v.nickname}</option>
                                    {/foreach}
                                </select>
                            </div>
                        </div>
                    </div>
                {/if}
                <div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-3">
                    <div class="col-sm-8 col-xs-offset-4">
                        <button type="submit" class="btn btn-success" formnovalidate="">提交</button>
                        <button type="reset" class="btn btn-default">重置</button>
                    </div>
                </div>
            </div>
        </fieldset>
    </form>
</script>